using Senparc.Weixin.HttpUtility;
using System;
using System.IO;
using System.Text;
namespace Senparc.Weixin.QY.AdvancedAPIs
{
	public static class TenPay
	{
		public static string Transfers(string data, int timeOut = 10000)
		{
			string url = "https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers";
			byte[] array = (data == null) ? new byte[0] : Encoding.UTF8.GetBytes(data);
			MemoryStream memoryStream = new MemoryStream();
			memoryStream.Write(array, 0, array.Length);
			memoryStream.Seek(0L, SeekOrigin.Begin);
			return RequestUtility.HttpPost(url, null, memoryStream, null, null, null, timeOut, false);
		}
		public static string GetTransferInfo(string data, int timeOut = 10000)
		{
			string url = "https://api.mch.weixin.qq.com/mmpaymkttransfers/gettransferinfo";
			byte[] array = (data == null) ? new byte[0] : Encoding.UTF8.GetBytes(data);
			MemoryStream memoryStream = new MemoryStream();
			memoryStream.Write(array, 0, array.Length);
			memoryStream.Seek(0L, SeekOrigin.Begin);
			return RequestUtility.HttpPost(url, null, memoryStream, null, null, null, timeOut, false);
		}
	}
}
